package smoothcraft.Util.home;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class Main implements CommandExecutor {
	private smoothcraft.Util.home.API api = new API();
	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] arg) {
		if(arg.length>0) {
			switch(arg[0]) {
				case "list":
					api.getPlayerHome(sender.getName());
					return true;
				case "sethome": if(arg[1] != null)  {
					api.getPlayerHome(sender.getName());
				}
				default:return true;
			}
		}
		return false;
	}
}
